<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
	<%-- CSS Style Declarations --%>
	<link rel ="stylesheet" type="text/css" href="stylesheets/style.css" ></link>
	
	<%-- Java imports --%>
	<%@ page import="com.google.appengine.api.blobstore.BlobstoreService" %>
	<%@ page import="com.google.appengine.api.blobstore.BlobstoreServiceFactory" %>
	<%@ page import="com.google.appengine.api.images.Image" %>
	
	<%-- Get reference to Java Objects --%>
	<% 
	BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
 	%>
	
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>Upload photo</title>
</head>

<body>

<div id="center-wrapper">
<div id="center-column">

<!-- Header -->
<div id="header">
<FORM action="tomain" method="post">
			<input
				type="submit"
				name="button1"
				class="headerbutton"
				value="Main Menu"
				title="">
</FORM>
</div> <!-- header -->


<!-- Page Title -->
<div id="page_title">
	Upload
</div> <!-- page title -->

<!-- Upload Form -->

<div style="
	position:absolute;
	top:140px;
	left:280px;
	width:300px;
	text-align:left;
	">
	
	
<form action="<%= blobstoreService.createUploadUrl("/upload") %>" method="post" enctype="multipart/form-data">
	<input type="text" name="foo">
	<input type="file" name="myfile">
	<input type="submit" value="Submit">
</form>
	
</div>	

<!-- Message -->
<div style="
	position:absolute;
	top: 370px;
	width: 600px;
	text-align:center;
	">
	<% out.println(request.getSession().getAttribute("message")); %>
</div> <!-- message -->

</div> <!-- center-column -->
</div> <!-- center-wrapper -->
</body>
</html>